# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-whitenoise
pkgver=6.8.2
pkgrel=0
pkgdesc="Radically simplified static file serving for Python web apps"
url="https://whitenoise.readthedocs.io/"
arch="noarch"
license="MIT"
depends="py3-brotli"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-django
	py3-pytest
	py3-requests
	"
subpackages="$pkgname-pyc"
source="https://github.com/evansd/whitenoise/archive/$pkgver/py3-whitenoise-$pkgver.tar.gz"
builddir="$srcdir/whitenoise-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
6b162d9147c83d77635f0a254d5462785a3ab21f87ea20db30ff330c5db28d183f8a7ce1eeae6e3b39b4f033cc1d3b1b261a4b5ff7d9bac4826218f59d948d68  py3-whitenoise-6.8.2.tar.gz
"
